-- GENERATED SPELL FOR [Rig Hauler AC-9] --


function spell0_25766(pUnit, Event) --@Arcing Smash,n/a--
pUnit:FullCastSpellOnTarget(8374,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25766', 526, 1)
end

function spell1_25766(pUnit, Event) --@Crowd Pummel,n/a--
pUnit:FullCastSpellOnTarget(10887,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25766', 5262, 1)
end

function spell2_25766(pUnit, Event) --@Trample,Self--
pUnit:FullCastSpellOnTarget(5568,pUnit)
pUnit:RegisterEvent('Sorts_25766', 508, 1)
end

function Sorts_25766(pUnit, Event)
local choix_sorts_25766 = math.random(0, 2)
if choix_sorts_25766 == 0 then
pUnit:RegisterEvent('spell0_25766', 1, 1)
end
if choix_sorts_25766 == 1 then
pUnit:RegisterEvent('spell1_25766', 1, 1)
end
if choix_sorts_25766 == 2 then
pUnit:RegisterEvent('spell2_25766', 1, 1)
end
end

function mob25766_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_25766', math.random(1500, 3000), 1)
end

function mob25766_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25766_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25766_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(25766, 1, 'mob25766_Action')
RegisterUnitEvent(25766, 2, 'mob25766_Leave')
RegisterUnitEvent(25766, 3, 'mob25766_Kill')
RegisterUnitEvent(25766, 4, 'mob25766_Die')
